<?php
if(!defined('BASE_DIR'))die('Cannot access the file !');
/**
 * -+-----------------------------------------
 * |PHP Framework
 * |Copyright (c) 2010 jinke.[iblue.cc]
 * |E-mail: mejinke@gmail.com
 * |Date: 2010-07-20
 * -+-----------------------------------------
 *
 * debug 程序调式类 主要用于踪 程序运行状态
 * @author jinke
 */
class Debug extends Base
{
	public static $classs;
	public static $tpls;
	public static $uris;
	public static $appNames;
	public static $appDirs;
	public static $controllers;
	public static $actions;
	public static $argss;
	public static $sqls;
	public static $sqlCount = 0;
	public static $sqlTime = 0;
	public static $runTime;

	/**
	 * 初始化类名文件
	 * @access public
	 * @param string $t
	 * @return void
	 */
	public static  function initClass($t='')
	{
		self::$classs[]= date('Y-m-d H:i:s').'：initialization '.$t;

	}

	/**
	 * 加载模板文件
	 * @access public
	 * @param string $file
	 * @return void
	 */
	public static  function tpls($file='')
	{
		self::$tpls[]= $file;
	}


	/**
	 * 打印调试信息
	 * @access public
	 * @return void
	 */
	public static function display()
	{
		self::$runTime=Functions::REG('runTime');
		ob_start();
		require FRAMEWORK_DIR.'misc/DebugTpl.php';
		$content =  ob_get_contents();
		ob_end_clean();
		return $content;
	}
}
?>